<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <title>登录</title>
    <script src="js/jquery.min.js"></script>
    <link href="css/login.css" rel="stylesheet" type="text/css" />
    <script>
        $(function() {
            $("#loginForm").submit(function() {
                $.post("loginServlet", $(this).serialize(), function(data) {
                    if (data.flag == true) {
                        location.href = "index.html";
                    } else {
                        alert(data.errorMsg);
                    }
                });
                return false;
            });
        });
    </script>
</head>

<body>
    <div class="login_box">
        <div class="login_l_img"><img src="images/logo.png" /></div>
        <div class="login" style="height: 420px;">
            <div class="login_logo">
                <a href="#"><img src="images/login_logo.png" /></a>
            </div>
            <div class="login_name">
                <p>登录界面</p>
            </div>
            <form method="post" id="loginForm">
                <select name="identity">
                            <option value="patient">患者</option>
                            <option value="doctor">医生</option>
                            <option value="Outpatient_manager">门诊管理员</option>
                </select>
                <input id="username" name="username" type="text" placeholder="用户名" required>
                <input id="password" name="password" type="password" id="password" placeholder="密码" required/>
                <input value="登录" style="width:100%;" type="submit">
            </form>
        </div>
        <div class="copyright">©2019 第十组医院</div>
    </div>
</body>

</html>